export default (res) => {
	switch (res.code) {
		case 200:
			return res;
		case 400:
		case 401:
			const errorMsg = res.msg || (res.code === 400 ? '请求错误' : '未授权');
			uni.showToast({
				title: errorMsg,
				icon: "error",
				duration: 1000
			});
			uni.redirectTo({
				url: '/pages/Login/Login',
			});
			break;
		default:
			break;
	}
};